package com.qy33.entity;

import java.math.BigDecimal;

/**
 * 高低点的描述实体
 * @author henry
 * @date 2013-01-25
 *
 */
public class Dot {

	// 1 是低点，2是高点
	public final static int Type_Low = 1;
	public final static int Type_High = 2;
	
	private String code;
	private String date;
	private BigDecimal price;
	private int type;
	
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer(64);
		sb.append("[code=").append(code).append(", date=").append(date)
			.append(", price=").append(price).append(", type=").append(type).append("]");
		return sb.toString();
	}
	
	@Override
	public boolean equals(Object obj) {
		Dot to = (Dot) obj;
		if (code.equals(to.getCode())
			&& date.equals(to.getDate())
			&& price.compareTo(to.getPrice()) == 0
			&& type == to.getType()) {
			return true;
		}
		return false;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	
}
